package com.lili.goods.service.impl;

import com.lili.goods.mapper.GoodsSpecificationMapper;
import com.lili.goods.service.GoodsSpecificationService;
import com.lili.model.goods.GoodsSpecValues;
import com.lili.model.goods.GoodsSpecification;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsSpecificationServiceImpl implements GoodsSpecificationService {

    @Autowired
    GoodsSpecificationMapper goodsSpecificationMapper;


    @Override
    public List<GoodsSpecification> getSpecification() {
        return goodsSpecificationMapper.selectList(null);
    }

    @Override
    public int saveSpecification(GoodsSpecification goodsSpecification) {
        return goodsSpecificationMapper.insert(goodsSpecification);
    }


    @Override
    public int updateSpecification(GoodsSpecification goodsSpecification) {
        return goodsSpecificationMapper.updateById(goodsSpecification);
    }

    @Override
    public int deleteSpecification(GoodsSpecification goodsSpecification) {
        return goodsSpecificationMapper.deleteById(goodsSpecification);
    }


}
